<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 500px;
            height: 500px;
            background-color: skyblue;
        }
    </style>
</head>
<body>

    <div>

    </div>
    <script>
        /* 
            touchstart   手指接觸到屏幕的瞬间触发  


            touchmove   手指在屏幕上移动 
        
            touchend  手指离开屏幕的瞬间  
        */
        var divele = document.querySelector('div');

        divele.ontouchstart = function(){
            console.log('开始触摸')
        }

        divele.ontouchmove = function(){
            console.log('移动 ')
        }

        divele.ontouchend = function(){
            console.log('离开屏幕')
        }
    </script>
</body>
</html>